#include <windows.h>
#include <vector>
#include "IGameState.h"
#include "SGD Wrappers/CSGD_Direct3D.h"
#include "SGD Wrappers/CSGD_TextureManager.h"
#include "SGD Wrappers/CSGD_DirectSound.h"
#include "SGD Wrappers/CSGD_WaveManager.h"
#include "SGD Wrappers/CSGD_DirectInput.h"
using namespace std;

class CMessage;
class MailSystem;

class CGame
{
	DWORD m_dwTimeStamp;
	float m_fDelta;
	float m_fPreviousTime;
	float m_fGameTime;
	int m_nScreenWidth;
	int m_nScreenHeight;
	bool m_bIsWindowed;
	vector<IGameState*> m_vecState;

	void Render();

	CGame();
	CGame(const CGame&);
	CGame& operator= (const CGame&);
	~CGame();

	


public:

	//Accessors
	int GetScreenWidth() {return m_nScreenWidth;};
	int GetScreenHeight() {return m_nScreenHeight;};

	static CGame* GetInstance();
	void Init(HWND hwnd, HINSTANCE hInstance, int nScreenWidth, int nScreenHeight, bool bIsWindowed);
	bool Main();
	void Shutdown();
	void PopState();
	void PushState(IGameState* state);
	void ClearAllStates();
	void ChangeState(IGameState *state);
	static void MessageProc(CMessage* message);
};


